package com.zhima.constant;

import java.util.regex.Pattern;

public class RegexConstant {
    /**
     * 手机号正则
     */
    public static final Pattern PHONE_REGEX = Pattern.compile("^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$");
    /**
     * 邮箱正则
     */
    public static final Pattern EMAIL_REGEX = Pattern.compile("^[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*@[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*\\.[a-z]{2,}$");
    /**
     * 密码正则。4~32位的字母、数字、下划线
     */
    public static final Pattern PASSWORD_REGEX = Pattern.compile("^(?=.{6,15})(?=.*[a-z])(?=.*[A-Z])(?=.*[_\\-<>|])(?!.*[^\\w_\\-<>|]).{6,15}");
}
